package com.bocloud.cmp.interfaces.resource;

import java.util.List;
import java.util.Map;

import com.bocloud.cmp.entity.resource.SafetyDevice;
import com.bocloud.cmp.model.SafetyDeviceBean;
import com.bocloud.common.model.BsmResult;
import com.bocloud.common.model.Param;

/**
 * 安全设备抽象Service接口
 * 
 * @author wei wei
 * @version 1.0
 * @since 2017.02.23
 */
public interface SafetyDeviceService {

	/**
	 * 添加
	 * 
	 * @param device
	 *            the device
	 * @return the result
	 */
	public BsmResult create(SafetyDevice device, Long userId);

	/**
	 * 更新
	 * 
	 * @param bean
	 *            the bean
	 * @param userId
	 *            the user id
	 * @return the result
	 */
	public BsmResult modify(SafetyDeviceBean bean, Long userId);

	/**
	 * 删除
	 * 
	 * @param id
	 *            the id
	 * @param id
	 *            the user id
	 * @return the result
	 */
	public BsmResult remove(Long id, Long userId);

	/**
	 * 详细
	 * 
	 * @param id
	 *            the id
	 * @return the result
	 */
	public BsmResult detail(Long id);

	/**
	 * 列表
	 * 
	 * @param page
	 *            the page
	 * @param rows
	 *            the rows
	 * @param params
	 *            the params
	 * @param sorter
	 *            the sorter
	 * @param simple
	 *            the simple
	 * @return the result
	 */
	public BsmResult list(int page, int rows, List<Param> params, Map<String, String> sorter, Boolean simple);

	/**
	 * 启动
	 * 
	 * @param id
	 * @return
	 */
	public BsmResult start(Long id);

	/**
	 * 批量启动
	 * 
	 * @param params
	 * @param userId
	 * @return
	 */
	public BsmResult batchStart(String params, Long userId);

	/**
	 * 安全设备批量停止
	 * 
	 * @param params
	 * @param userId
	 * @return
	 */
	public BsmResult batchStop(String params, Long userId);

	/**
	 * 安全设备批量删除
	 * 
	 * @param params
	 * @param userId
	 * @return
	 */
	public BsmResult batchRemove(String params, Long userId);

	/**
	 * 停止
	 * 
	 * @param id
	 * @return
	 */
	public BsmResult stop(Long id);

}
